#URL = "http://www.pyside.org/files/generatorrunner-%(VERSION)s.tar.bz2"
URL = "https://distfiles.macports.org/generatorrunner/generatorrunner-%(VERSION)s.tar.bz2"
VERSIONS = ["0.6.7", "0.6.8", "0.6.9", "0.6.10"]
DEFAULT_VERSION = "0.6.10"
DEPENDS = ["jom", "qt4osmin", "apiextractor"]

from source.builders import CMakeJomBuilder
import os

#build instructions
#http://developer.qt.nokia.com/wiki/Building_PySide 

class generatorrunnerBuilder( CMakeJomBuilder ):
  """ subclass of CMakeJomBuilder with custom configure step """
          
  def configure(self):
    if "jom" in self.dependencies.keys(): 
      self.dependencies["jom"].addexetopath()
    qtdir = self.dependencies['qt4osmin'].targetpath()
    os.environ['QTDIR'] = qtdir
    os.environ['ApiExtractor_DIR'] = self.dependencies['apiextractor'].targetpath()
    notests = " -DBUILD_TESTS=FALSE"
    debugpostfix = r" -DCMAKE_DEBUG_POSTFIX='_d'"
    CMakeJomBuilder.configure(self, notests+debugpostfix)

BUILDER = generatorrunnerBuilder
